<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Jialeo\LaravelSchemaExtend\Schema;

class CreateCaseDescribesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        if (!Schema::hasTable('c_case_describes')) {
            Schema::create('c_case_describes', function (Blueprint $table) {
                $table->increments('id');
                $table->string('name')->comment('姓名');
                $table->char('sex', 2)->default(0)->comment('性别(1:男,2:女)');
                $table->integer('age')->default(0)->comment('年龄');
                $table->string('bloodType')->comment('血型');
                $table->string('allergy')->comment('过敏史');
                $table->string('diseasesHistory')->comment('疾病史');
                $table->string('picture')->comment('图片');
                $table->timestamps();
                $table->comment = '病情描述-新建';
            });
        }
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('c_case_describes');
    }
}
